#ifndef CSGPATCHNODEDATA_H
#define CSGPATCHNODEDATA_H

#include "csgnode.h"
#include "tree/tree.h"
#include "csgprimitivenode.h"
#include "CSG/bezier.h"

class CSGPatchNode : public CSGNode, public Bezier
{
public:
    CSGPatchNode();
    CSGPatchNode(int *_ctrlPoly, double **_ctrlPts, CSGNode *parent = NULL);
    CSGPatchNode(int *_ctrlPoly, double **_ctrlPts, Expression& c, CSGNode *parent = NULL);
    ~CSGPatchNode();

    void addConstraint(Expression &expr);

private:
    // naive patch points
    int numOfPatchPts;
    double **patchPts;

    // constraints
    static Variable u, v;
    static Expression expr_u, expr_v;

    CSGPrimitiveNode *constraints;
};

#endif // CSGPATCHNODEDATA_H
